/**
 * 2017年5月3日
 */
package pojo.dto.services;

/**
 * @author Alex
 *
 */
public class Vec {
	boolean addConstantTime;
	boolean dense;
	int iteratorAdvanceCost;
	double lengthSquared;
	int lookupCost;
	int numNonZeroElements;
	int numNondefaultElements;
	boolean sequentialAccess;
	double [] values;
	/**
	 * @return the addConstantTime
	 */
	public boolean isAddConstantTime() {
		return addConstantTime;
	}
	/**
	 * @param addConstantTime the addConstantTime to set
	 */
	public void setAddConstantTime(boolean addConstantTime) {
		this.addConstantTime = addConstantTime;
	}
	/**
	 * @return the dense
	 */
	public boolean isDense() {
		return dense;
	}
	/**
	 * @param dense the dense to set
	 */
	public void setDense(boolean dense) {
		this.dense = dense;
	}
	/**
	 * @return the iteratorAdvanceCost
	 */
	public int getIteratorAdvanceCost() {
		return iteratorAdvanceCost;
	}
	/**
	 * @param iteratorAdvanceCost the iteratorAdvanceCost to set
	 */
	public void setIteratorAdvanceCost(int iteratorAdvanceCost) {
		this.iteratorAdvanceCost = iteratorAdvanceCost;
	}
	/**
	 * @return the lengthSquared
	 */
	public double getLengthSquared() {
		return lengthSquared;
	}
	/**
	 * @param lengthSquared the lengthSquared to set
	 */
	public void setLengthSquared(double lengthSquared) {
		this.lengthSquared = lengthSquared;
	}
	/**
	 * @return the lookupCost
	 */
	public int getLookupCost() {
		return lookupCost;
	}
	/**
	 * @param lookupCost the lookupCost to set
	 */
	public void setLookupCost(int lookupCost) {
		this.lookupCost = lookupCost;
	}
	/**
	 * @return the numNonZeroElements
	 */
	public int getNumNonZeroElements() {
		return numNonZeroElements;
	}
	/**
	 * @param numNonZeroElements the numNonZeroElements to set
	 */
	public void setNumNonZeroElements(int numNonZeroElements) {
		this.numNonZeroElements = numNonZeroElements;
	}
	/**
	 * @return the numNondefaultElements
	 */
	public int getNumNondefaultElements() {
		return numNondefaultElements;
	}
	/**
	 * @param numNondefaultElements the numNondefaultElements to set
	 */
	public void setNumNondefaultElements(int numNondefaultElements) {
		this.numNondefaultElements = numNondefaultElements;
	}
	/**
	 * @return the sequentialAccess
	 */
	public boolean isSequentialAccess() {
		return sequentialAccess;
	}
	/**
	 * @param sequentialAccess the sequentialAccess to set
	 */
	public void setSequentialAccess(boolean sequentialAccess) {
		this.sequentialAccess = sequentialAccess;
	}
	/**
	 * @return the values
	 */
	public double[] getValues() {
		return values;
	}
	/**
	 * @param values the values to set
	 */
	public void setValues(double[] values) {
		this.values = values;
	}
	
	public String toVecSVMLine(){
		StringBuilder sb = new StringBuilder();
		for(int i=0;i<values.length;i++){
			sb.append(values[i]);
			if(i!=values.length){
				sb.append(" ");
			}
		}
		return sb.toString();
	}
	
}
